package com.hamster.crmpre.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hamster.crmpre.pojo.LeveragePlanInformation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
public interface LeveragePlanInformationMapper extends BaseMapper<LeveragePlanInformation> {

    /**
     * 发起杠杆计划审核 拒绝
     * @param messageLink
     */
    @Update("update leverage_plan_information  set verify = 2 where id = #{id}")
    void initiateLeveragePlansRefuse(@Param("id") String messageLink);

    /**
     * 发起杠杆计划审核通过
     * @param messageLink
     */
    @Update("update leverage_plan_information  set verify = 1 where id = #{id}")
    void initiateLeveragePlansPass(@Param("id")String messageLink);

    /**
     * 修改完成 百分比
     * @param id
     * @param s
     */
    @Update("update leverage_plan_information set complete_schedule=#{state} where id = #{id}")
    void updateCompleteSchedule(@Param("id") String id,@Param("state") String s);

    /**
     * 修改当前状态  0 进行中   1 已结束
     * @param id
     * @param s
     */
    @Update("update leverage_plan_information set state=#{state} where id = #{id}")
    void updateState(@Param("id") String id,@Param("state")String s);
}
